﻿Imports System.Xml
Imports System.Xml.Xsl

Partial Class UserCuntrols_AddRatator
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        PopulateLinks()
    End Sub
    Private Sub PopulateLinks()
        Dim oXmlDocument As New XmlDocument()
        oXmlDocument.Load(Server.MapPath(_XMlFile))
        Dim oXslDocument As New XslCompiledTransform()
        Dim _Random As New Random()
        Dim _RandomNumber = _Random.Next Mod 2
        litAds.Text = oXmlDocument.ChildNodes(1).ChildNodes(_RandomNumber).InnerText
    End Sub
    Dim _XMlFile As String
    Property XMLFile() As String
        Get
            Return _XMlFile
        End Get
        Set(ByVal value As String)
            _XMlFile = value
        End Set
    End Property
End Class
